
//==========================================
#ifndef KEYDL_H_
#define KEYDL_H_

#include "lpc_types.h"
#include "lpc17xx_pinsel.h"
#include "lpc17xx_gpio.h"

#define	AMLED_ON 		GPIO_ClearValue(PINSEL_PORT_1, (1<<PINSEL_PIN_10));  
#define	AMLED_OFF 	GPIO_SetValue(PINSEL_PORT_1, (1<<PINSEL_PIN_10));
#define	K1LED_ON		GPIO_ClearValue(PINSEL_PORT_1, (1<<PINSEL_PIN_9));  
#define	K1LED_OFF		GPIO_SetValue(PINSEL_PORT_1, (1<<PINSEL_PIN_9));
#define	K0LED_ON		GPIO_ClearValue(PINSEL_PORT_1, (1<<PINSEL_PIN_8));  
#define	K0LED_OFF		GPIO_SetValue(PINSEL_PORT_1, (1<<PINSEL_PIN_8));
#define	LED2_ON			GPIO_ClearValue(PINSEL_PORT_1, (1<<PINSEL_PIN_24));  
#define	LED2_OFF		GPIO_SetValue(PINSEL_PORT_1, (1<<PINSEL_PIN_24));
#define	LED3_ON			GPIO_ClearValue(PINSEL_PORT_1, (1<<PINSEL_PIN_23));  
#define	LED3_OFF		GPIO_SetValue(PINSEL_PORT_1, (1<<PINSEL_PIN_23));


void		ReadKey(void);
void		KeyDeal(void);
void buttonDeal(void);
void chSwitch(uint8_t chanel);
void keyLed(uint8_t chanel);
#endif
//==========================================